package com.headFirst.frist;

public class RedheadDuck extends Duck {
    @Override
    public void display() {
        System.out.println("the head is red");
    }

    public RedheadDuck() {
        quackbehavio = new Quack();
        flybehavior = new FlyNoWay();
    }
    public void fly(){
        flybehavior.fly();
    }
    public void quack(){
        quackbehavio.quack();
    }

}
